package com.hkyp.ss.course.apis.utils;

/**
 * @Description:
 * @Author:
 * @CreateDate: 2018/7/29 12:39
 */
public class VCodeUtil {

    /**
     * @Description: 随机生成i位验证码（String）
     * @return: java.lang.String
     * @Date: 2018/6/16 12:24
     */
    public static String randomVCode(int i) {
        String vCode = "";
        if (i <= 0)
            return null;
        for (int x = 0; x < i; x++) {
            vCode = vCode + (int) (Math.random() * 9);
        }
        return vCode;
    }
}
